home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWNotifn / Sources / FWNotifi.cpp < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.4 KB  |  84 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWNotifn.cpp
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWFound.hpp"
  11.  
  12. #ifndef FWNOTIFN_H
  13. #include "FWNotifn.h"
  14. #endif
  15.  
  16. #ifndef FWPRIDEB_H
  17. #include "FWPriDeb.h"
  18. #endif
  19.  
  20. //========================================================================================
  21. // CLASS FW_CNotification
  22. //========================================================================================
  23.  
  24. FW_DEFINE_CLASS_M0(FW_CNotification)
  25.  
  26. //----------------------------------------------------------------------------------------
  27. // FW_CNotification::FW_CNotification
  28. //----------------------------------------------------------------------------------------
  29.  
  30. FW_CNotification::FW_CNotification() :
  31.     fInterest(NULL)
  32. {
  33. }
  34.  
  35. FW_CNotification::FW_CNotification(const FW_CInterest& interest) :
  36.     fInterest(NULL)
  37. {
  38.     fInterest = new FW_CInterest(interest);
  39. }
  40.  
  41. FW_CNotification::FW_CNotification(const FW_CNotification& other) :
  42.     fInterest(other.fInterest)
  43. {
  44. }
  45.  
  46. //----------------------------------------------------------------------------------------
  47. // FW_CNotification::~FW_CNotification
  48. //----------------------------------------------------------------------------------------
  49.  
  50. FW_CNotification::~FW_CNotification()
  51. {
  52. }
  53.  
  54. //----------------------------------------------------------------------------------------
  55. // FW_CNotification::SetInterest
  56. //----------------------------------------------------------------------------------------
  57.  
  58. void FW_CNotification::SetInterest(const FW_CInterest& interest) 
  59. {
  60.     FW_ASSERT(fInterest == NULL);
  61.     
  62.     fInterest = new FW_CInterest(interest);
  63. }
  64.  
  65. //----------------------------------------------------------------------------------------
  66. // FW_CNotification::operator==
  67. //----------------------------------------------------------------------------------------
  68.  
  69. FW_Boolean FW_CNotification::operator==(const FW_CNotification& other)
  70. {
  71.     return *fInterest == *(other.fInterest);
  72. }
  73.  
  74. //----------------------------------------------------------------------------------------
  75. // FW_CNotification::operator=
  76. //----------------------------------------------------------------------------------------
  77.  
  78. FW_CNotification& FW_CNotification::operator=(const FW_CNotification& other)
  79. {
  80.     fInterest = other.fInterest;
  81.     return *this;
  82. }
  83.  
  84.